#include <stdio.h>
int main()
{
	int n;
	scanf("%d",&n);
	if(n>100000)
	printf("%d-%02d",n/100,n%100);
	else{
		if(n<2200)
		printf("20%02d-%02d",n/100,n%100);
		else
		printf("19%02d-%02d",n/100,n%100);
	}
	return 0;
}
